package cn.pjz.dataUpload.entity;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.univocity.parsers.annotations.Parsed;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("r_transacting")
public class RTransaction {

    @TableId(value = "transaction_id")
    private String transactionId;

    @Parsed(field = "transactionDate")
    @TableId(value = "transaction_date")
    private String transactionDate;

    @Parsed(field = "交易类型")
    @TableId(value = "transaction_type")
    private String transactionType;

    @Parsed(field = "商品")
    @TableId(value = "transaction_commodity")
    private String transactionCommodity;

    @Parsed(field = "金额(元)")
    @TableId(value = "transaction_money")
    private String transactionMoney;

    @TableId(value = "transaction_app")
    private String transactionApp;

    @Parsed(field = "交易对方")
    @TableId(value = "transaction_way")
    private String transactionWay;
    @TableId(value = "transaction_user")
    private Integer transactionUser;

    @Parsed(field = "支付方式")
    @TableId(value = "transacting_party")
    private String transactingParty;

    @Parsed(field = "收/支")
    private String transactingForm;

    private String count;

    @TableId(value = "introducer")
    private Integer introducer;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)

    @TableId(value = "lead_in_time")
    private LocalDateTime leadInTime;

}
